import 'package:hockey/jzx_apps.dart';
import 'package:hockey/models/jzx_cdt_item.dart';
import 'package:hockey/pages/jzx_home/widgets/jzx_condition_pop.dart';
import 'package:hockey/pages/jzx_home/widgets/jzx_purchase_pop.dart';
import 'package:hockey/services/jzx_user.dart';

class JzxAvatarUpgradeController extends GetxController {
  /// 购买
  showPurchase(Rx<JzxCdtItem> item) {
    if (!JzxUserService.to.isOwnLevel(item.value.level)) {
      showMessage('Please get the original avatar frame first');
      return;
    }
    Get.dialog(
      JzxPurchasePopView(item),
      barrierColor: myAppColors.barrierColor,
      // barrierDismissible: false,
    );
  }

  /// 显示解锁条件
  showUnlockConditions(Rx<JzxCdtItem> item) {
    Get.dialog(
      JzxConditionPopView(item),
      barrierColor: myAppColors.barrierColor,
      // barrierDismissible: false,
    );
  }
}
